<?php

abstract class Cat_ParamHolder
{
	private $params = array();

	function setParam( $name, $value )
	{
		$this->params[$name] = $value;
	}
	
	function getParam( $name )
	{
		if( !isset( $this->params[$name] )  )
		{
			return null;
		}
		
		return $this->params[$name];
	}
	
	function __get( $name )
	{
		return $this->getParam( $name );
	}
	
	function __set( $name, $value )
	{
		$this->setParam( $name, $value );
	}
	
	function setAllParams( array $params )
	{
		$this->params = array_merge( $this->params, $params );
	}
	
	function getAllParams()
	{
		return $this->params;
	}
		
	function cloneParams( Cat_ParamHolderInterface $ph )
	{			
		$ph->setAllParams( $this->getAllParams() );		
		return $ph;
	}
}

?>
